package com.easy.framework.common.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 * 
 * @author easy
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "easy")
public class EasyProperties
{
    /** 项目名称 */
    private String name;

    /** 版本 */
    private String version;

    /** 版权年份 */
    private String copyrightYear;

    /** 实例演示开关 */
    private static boolean demoEnabled;

    /** 获取地址开关 */
    private static boolean addressEnabled;

    public void setDemoEnabled(boolean demoEnabled){
        EasyProperties.demoEnabled = demoEnabled;
    }

    public static boolean getDemoEnabled(){
        return demoEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled){
        EasyProperties.addressEnabled = addressEnabled;
    }

    public static boolean getAddressEnabled(){
        return addressEnabled;
    }

}
